import { App } from 'vue'
// import fileRoutes from '~pages'
// import { setupLayouts } from 'virtual:meta-layouts'
import { createRouter, createWebHistory } from 'vue-router'
import { setupLayouts } from 'virtual:generated-layouts'
import generatedRoutes from 'virtual:generated-pages'

export const router = createRouter({
  routes: setupLayouts(generatedRoutes),
  history: createWebHistory(),
})

export default (app: App) => app.use(router)
